package javaLearning.反射;

/**
 * @author : K k
 * @date : 21:33 2020/8/19
 */
public class User {

    private String name;
    private int age;

    static {
        System.out.println("我进行了连接");
    }

    public User(){}

    public User(String name,int age){
        this.name=name;
        this.age=age;
    }

    public void readBook(){
        System.out.println("我会读书");
    }

    private void fight(){
        System.out.println("还会打架");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
